<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%--增加/编辑人员页面--%>
<!DOCTYPE HTML>
<html>
<head>
	<base href="<%=basePath%>pages/weixin/">
	<meta charset="utf-8">
 	<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
	<meta name="apple-mobile-web-app-capable" content="yes"/>
	<meta name="format-detection" content="telephone=no">
	<meta names="apple-mobile-web-app-status-bar-style" content="black-translucent"/>
	<meta name="apple-touch-fullscreen" content="yes"/>
	
	<title>居住人员详情</title>
 	<link rel="stylesheet" href="../../static/weui/weuix.min.css"/>
 	<style>
 	.mybtn {
 		margin-top: 10px;
 		margin-bottom: 20px;
 	}
 	.page-bd-15 {
 		padding-bottom: 20px;
 	}
 	</style>
	<script type="text/javascript" src="../../static/weui/zepto.min.js"></script>
	<script>
		$(function() {
			// 表单验证
		});
	</script>

</head>
<body ontouchstart class="page-bg">

<div class="page-bd-15">
	<div class="weui_cells_title">人员信息</div>
	<form action="<%=path%>/wechat/savePersonWeixin.do" method="post">
		<input type="hidden" name="uid" value="${uid}">
		<input type="hidden" name="hid" value="${houseId}">
		<input type="hidden" name="person.oid" value="${person.oid}">
		<input type="hidden" name="person.house.oid" value="${houseId}">
		<input type="hidden" name="person.dept.depId" value="${deptId}">
		<input type="hidden" name="person.recordUser.userId" value="${userId}">
		
		<div class="weui_cells weui_cells_form">
		    <div class="weui_cell">
		        <div class="weui_cell_hd"><label class="weui_label">姓名</label></div>
		        <div class="weui_cell_bd weui_cell_primary">
		        	<input class="weui_input" name="person.name" value="${person.name}" type="text" placeholder="请输入姓名"/>
		        </div>
		    </div>
		    <div class="weui_cell">
		        <div class="weui_cell_hd"><label for="" class="weui_label">民族</label></div>
		        <div class="weui_cell_bd weui_cell_primary">
		           	<select name="person.nation.dicId" id="nation" class="weui_input">
		           		<option value="" disabled selected hidden>请选择</option>
				   		<c:forEach var="n" items="${nations}">
							<option value="${n.dicId}" <c:if test="${person.nation.dicId == n.dicId}">selected="selected"</c:if>>${n.itemValue}</option>
						</c:forEach>
				 	</select>
		        </div>
		    </div> 
		    <div class="weui_cell">
		        <div class="weui_cell_hd"><label for="" class="weui_label">性别</label></div>
		        <div class="weui_cell_bd weui_cell_primary">
		        	<select name="person.gender" id="gender" class="weui_input">
		        		<option value="" disabled selected hidden>请选择</option>
				   		<option value="0" <c:if test="${person.gender == 0}">selected="selected"</c:if>>男</option>
				        <option value="1" <c:if test="${person.gender == 1}">selected="selected"</c:if>>女</option>
				 	</select>
		        </div>
		    </div> 
		    
		    <div class="weui_cell">
		        <div class="weui_cell_hd"><label class="weui_label">身份证</label></div>
		        <div class="weui_cell_bd weui_cell_primary">
		            <input class="weui_input" id="cardNo" name="person.cardNo" value="${person.cardNo}" type="text" pattern="[0-9]{18}" placeholder="请输入身份证号"/>
		        </div>
		    </div>
		    <div class="weui_cell">
		        <div class="weui_cell_hd"><label class="weui_label">年龄</label></div>
		        <div class="weui_cell_bd weui_cell_primary">
		            <input class="weui_input" id="age" name="person.age" value="${person.age}" type="number" pattern="[0-9]*" placeholder="请输入年龄"/>
		        </div>
		    </div>
		    <div class="weui_cell">
		        <div class="weui_cell_hd"><label for="" class="weui_label">特殊标识</label></div>
		        <div class="weui_cell_bd weui_cell_primary">
		            <select name="person.specialType.dicId" id="specialType" class="weui_input">
		            	<option value="" selected hidden>未选择</option>
				   		<c:forEach var="n" items="${specialTypes}">
							<option value="${n.dicId}" <c:if test="${person.specialType.dicId == n.dicId}">selected="selected"</c:if>>${n.itemValue}</option>
						</c:forEach>
				 	</select>
		        </div>
		    </div> 
		    <label for="joinState" class="weui-agree"> 
		     	<input name="person.joinState" class="weui-agree-checkbox" type="checkbox" value="1" <c:if test="${person.joinState==1}">checked="checked"</c:if>>
		     	<span class="weui-agree-text">经常参加大宣讲</span>
		 	</label>
		    <div class="weui_cell">
		        <div class="weui_cell_hd"><label class="weui_label">身份</label></div>
		        <div class="weui_cell_bd weui_cell_primary">
		            <input class="weui_input" type="text" name="person.shenfen" value="${person.shenfen}" placeholder="请输入身份"/>
		        </div>
		    </div>
		    <div class="weui_cell">
		        <div class="weui_cell_hd"><label class="weui_label">联系电话</label></div>
		        <div class="weui_cell_bd weui_cell_primary">
		            <input class="weui_input" type="tel" name="person.phone" value="${person.phone}" placeholder="请输入电话"/>
		        </div>
		    </div>
		    <div class="weui_cell">
		         <div class="weui_cell_bd weui_cell_primary">
		             <textarea name="person.note" class="weui_textarea" placeholder="请输入备注信息" rows="3">${person.note}</textarea>
		         </div>
		    </div>
		</div>
	    <input type="submit" class="weui_btn weui_btn_primary mybtn" value="保 存">
	</form>
</div>
</body>
</html>
